quartz: code cleanup
authorTom Schoonjans <Tom.Schoonjans@diamond.ac.uk>
Tue, 28 Feb 2017 21:54:46 +0000 (21:54 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 1 Apr 2017 20:45:37 +0000 (16:45 -0400)
removed unused static functions, unused class variables and a large
comment section that was copied over from gdkdisplay-x11.h

https://bugzilla.gnome.org/show_bug.cgi?id=779184

gdk/quartz/gdkdisplay-quartz.h
gdk/quartz/gdkmonitor-quartz.c
gdk/quartz/gdkmonitor-quartz.h
gdk/quartz/gdkscreen-quartz.c

index ea02558578fc093b0d64c973fe38b0c2cbb3b50b..d338be5e486c85bc0d82dd0017ea651721ceb014 100644 (file)
@@ -32,119 +32,7 @@ G_BEGIN_DECLS
 struct _GdkQuartzDisplay
 {
   GdkDisplay parent_instance;
-  /*Display *xdisplay;
-  GdkScreen *screen;
-  GList *screens;
-
-  GSource *event_source;
-
-  gint grab_count;
-  */
-  /* Visual infos for creating Windows */
-  /*int window_depth;
-  Visual *window_visual;
-  Colormap window_colormap;
-  */
-  /* Keyboard related information */
-  /*gint xkb_event_type;
-  gboolean use_xkb;
-  */
-  /* Whether we were able to turn on detectable-autorepeat using
-   * XkbSetDetectableAutorepeat. If FALSE, we'll fall back
-   * to checking the next event with XPending().
-   */
-  /*gboolean have_xkb_autorepeat;
-
-  GdkKeymap *keymap;
-  guint      keymap_serial;
-
-  gboolean have_xfixes;
-  gint xfixes_event_base;
-
-  gboolean have_xcomposite;
-  gboolean have_xdamage;
-  gint xdamage_event_base;
-
-  gboolean have_randr12;
-  gboolean have_randr13;
-  gboolean have_randr15;
-  gint xrandr_event_base;
-  */
-  /* If the SECURITY extension is in place, whether this client holds
-   * a trusted authorization and so is allowed to make various requests
-   * (grabs, properties etc.) Otherwise always TRUE.
-   */
-  /*gboolean trusted_client;
-  */
-  /* drag and drop information */
-  /*GdkDragContext *current_dest_drag;
-  */
-  /* Mapping to/from virtual atoms */
-  /*GHashTable *atom_from_virtual;
-  GHashTable *atom_to_virtual;
-  */
-  /* Session Management leader window see ICCCM */
-  /*Window leader_window;
-  GdkWindow *leader_gdk_window;
-  gboolean leader_window_title_set;
-  */
-  /* List of functions to go from extension event => X window */
-  /*GSList *event_types;
-  */
-  /* X ID hashtable */
-  /*GHashTable *xid_ht;
-  */
-  /* translation queue */
-  /*GQueue *translate_queue;
-  */
-  /* input GdkWindow list */
-  /*GList *input_windows;
-  */
   GPtrArray *monitors;
-
-  /* Startup notification */
-  /*gchar *startup_notification_id;
-  */
-  /* Time of most recent user interaction. */
-  /*gulong user_time;
-  */
-  /* Sets of atoms for DND */
-  /*guint base_dnd_atoms_precached : 1;
-  guint xdnd_atoms_precached : 1;
-  guint motif_atoms_precached : 1;
-  guint use_sync : 1;
-
-  guint have_shapes : 1;
-  guint have_input_shapes : 1;
-  gint shape_event_base;
-
-  GSList *error_traps;
-
-  gint wm_moveresize_button;
-  */
-  /* GLX information */
-  /*gint glx_version;
-  gint glx_error_base;
-  gint glx_event_base;
-  */
-  /* Translation between X server time and system-local monotonic time */
-  /*gint64 server_time_query_time;
-  gint64 server_time_offset;
-  */
-  /*guint server_time_is_monotonic_time : 1;
-
-  guint have_glx : 1;
-  */
-  /* GLX extensions we check */
-  /*guint has_glx_swap_interval : 1;
-  guint has_glx_create_context : 1;
-  guint has_glx_texture_from_pixmap : 1;
-  guint has_glx_video_sync : 1;
-  guint has_glx_buffer_age : 1;
-  guint has_glx_sync_control : 1;
-  guint has_glx_multisample : 1;
-  guint has_glx_visual_rating : 1;
-  guint has_glx_create_es2_context : 1;*/
 };
 
 struct _GdkQuartzDisplayClass
index 824d80f731994a00d6259f687de0d59d6e56cc5d..ec36b23ec2565234cecaa9eaabe09dac4bad2258 100644 (file)
 
 G_DEFINE_TYPE (GdkQuartzMonitor, gdk_quartz_monitor, GDK_TYPE_MONITOR)
 
-static gboolean
-gdk_monitor_has_fullscreen_window (GdkMonitor *monitor)
-{
-  GdkScreen *screen = gdk_display_get_default_screen (monitor->display);
-  GList *toplevels, *l;
-  GdkWindow *window;
-  gboolean has_fullscreen;
-
-  toplevels = gdk_screen_get_toplevel_windows (screen);
-
-  has_fullscreen = FALSE;
-  for (l = toplevels; l; l = l->next)
-    {
-      window = l->data;
-
-      if ((gdk_window_get_state (window) & GDK_WINDOW_STATE_FULLSCREEN) == 0)
-        continue;
-
-      if (gdk_window_get_fullscreen_mode (window) == GDK_FULLSCREEN_ON_ALL_MONITORS ||
-          gdk_display_get_monitor_at_window (monitor->display, window) == monitor)
-        {
-          has_fullscreen = TRUE;
-          break;
-        }
-    }
-
-  g_list_free (toplevels);
-
-  return has_fullscreen;
-}
-
 static void
 gdk_quartz_monitor_get_workarea (GdkMonitor   *monitor,
                                  GdkRectangle *dest)
index e076ed21a2a38b62fe457c01f7ba1fd4c82502f9..448c483f7a8a232d91c990546d310b6603a12fa9 100644 (file)
@@ -30,10 +30,7 @@ struct _GdkQuartzMonitor
 {
   GdkMonitor parent;
 
-  //guint add     : 1;
-  //guint remove  : 1;
   NSScreen *nsscreen;
-  int index;
 };
 
 struct _GdkQuartzMonitorClass {
index 4f5713dd81c805b0aa5d0dfe83382d6f30bc9417..661193dc928396160f911e429d70471e73df9b1e 100644 (file)
@@ -153,7 +153,6 @@ gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
                                                 NULL);
       g_ptr_array_add (display_quartz->monitors, monitor);
       monitor->nsscreen = [array objectAtIndex:i];
-      monitor->index = i;
 
       NSRect rect = [[array objectAtIndex:i] frame];